-
Notifications
You must be signed in to change notification settings - Fork 366
[WIP] flamenco, vm: add bpf loader serialization test fixtures #7459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
This pr depends on, and adds tests for, #7389. Needs to be rebased when 7389 is merged. |
3d25c88 to
3aa95f5
Compare
| FD_FEATURE_ACTIVE( load_slot, features, account_data_direct_mapping ), | ||
| FD_FEATURE_ACTIVE( load_slot, features, stricter_abi_and_runtime_constraints ), | ||
| 0 ); | ||
| 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could be useful to have in-line comments with what these values are, much like in fd_bpf_loader_program.c
3aa95f5 to
a15b3ff
Compare
a15b3ff to
9a7e90d
Compare
| if( FD_UNLIKELY( err ) ) { | ||
| return err; | ||
| } | ||
|
|
||
| if( FD_UNLIKELY( input==NULL ) ) { | ||
| return FD_EXECUTOR_INSTR_ERR_MISSING_ACC; | ||
| } | ||
|
|
||
| fd_sha256_t _sha[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fd_exec_instr_ctx_get_index_of_instr_account_in_transaction throws FD_EXECUTOR_INSTR_ERR_MISSING_ACC if the account is missing, so propagating the error is the correct thing to do here and doesn't change the behaviour.
Performance Measurements ⏳
|
Performance Measurements ⏳
|
Performance Measurements ⏳
|
| @@ -0,0 +1,58 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ik this is still WIP but would it be better to have these as test vector fixtures instead ofo having a bunch of JSONs committed to the repo?
Adds a set of fixtures and a unit test fixture runner for vm input serialization, generated by running the input through the Agave vm input serializers. Compares the output buffer, the vm regions and the region metadata. Includes coverage of
stricter_abi_and_runtime_constraintsandaccount_data_direct_mapping.Adjusted some of the serialization code to make it more amenable for unit testing, removing the dependency on
fd_runtime_t.